Add post-release patches so test-symbols.sh passes again
authorSimon McVittie <smcv@debian.org>
Wed, 21 Jun 2017 10:21:19 +0000 (11:21 +0100)
committerSimon McVittie <smcv@debian.org>
Wed, 21 Jun 2017 10:21:19 +0000 (11:21 +0100)
debian/changelog
debian/patches/build-Add-devel-or-release-to-OSTREE_FEATURES-for-test-sy.patch [new file with mode: 0644]
debian/patches/main-DevelBuild-yes-to-ostree-version-for-devel-builds.patch [new file with mode: 0644]
debian/patches/series [new file with mode: 0644]

index 4850e53026cbae818192be6d1e1202a05cd69a10..ffc3ea7473bc2e6fd2c3a3fa49574881a401655d 100644 (file)
@@ -6,6 +6,7 @@ ostree (2017.7-1) UNRELEASED; urgency=medium
   * debian/dist/: Add ostree-trivial-httpd.xml, which was incorrectly
     excluded from the upstream release
   * Implement <nodoc> build profile
+  * Add post-release patches so test-symbols.sh passes again
 
  -- Simon McVittie <smcv@debian.org>  Wed, 21 Jun 2017 10:07:42 +0100
 
diff --git a/debian/patches/build-Add-devel-or-release-to-OSTREE_FEATURES-for-test-sy.patch b/debian/patches/build-Add-devel-or-release-to-OSTREE_FEATURES-for-test-sy.patch
new file mode 100644 (file)
index 0000000..27c5610
--- /dev/null
@@ -0,0 +1,44 @@
+From: Philip Withnall <withnall@endlessm.com>
+Date: Tue, 20 Jun 2017 17:38:15 +0100
+Subject: =?utf-8?q?build=3A_Add_=E2=80=98devel=E2=80=99_or_=E2=80=98releas?=
+ =?utf-8?q?e=E2=80=99_to_OSTREE=5FFEATURES_for_test-symbols=2Esh?=
+
+test-symbols.sh was looking for the DevelBuild string, which is actually
+part of the output from `ostree --version`, not $OSTREE_FEATURES.
+
+Signed-off-by: Philip Withnall <withnall@endlessm.com>
+
+Closes: #948
+Approved by: cgwalters
+
+Origin: upstream, 2017.8, commit:fd50c9732231895b18cd8158726e7f77bc8dcae6
+---
+ configure.ac          | 1 +
+ tests/test-symbols.sh | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 58795a7..65a354c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -464,6 +464,7 @@ AM_COND_IF([BUILDOPT_IS_DEVEL_BUILD],
+             AC_DEFINE([BUILDOPT_IS_DEVEL_BUILD], [1], [Define if doing a development build])
+             release_build_type=devel,
+             release_build_type=release)
++OSTREE_FEATURES="$OSTREE_FEATURES $release_build_type"
+ AC_CONFIG_FILES([
+ Makefile
+diff --git a/tests/test-symbols.sh b/tests/test-symbols.sh
+index 3f62730..4a11183 100755
+--- a/tests/test-symbols.sh
++++ b/tests/test-symbols.sh
+@@ -22,7 +22,7 @@ set -xeuo pipefail
+ echo '1..3'
+ released_syms=${G_TEST_SRCDIR}/src/libostree/libostree-released.sym
+-if echo "$OSTREE_FEATURES" | grep --quiet --no-messages "DevelBuild"; then
++if echo "$OSTREE_FEATURES" | grep --quiet --no-messages "devel"; then
+     devel_syms=${G_TEST_SRCDIR}/src/libostree/libostree-devel.sym
+ else
+     devel_syms=
diff --git a/debian/patches/main-DevelBuild-yes-to-ostree-version-for-devel-builds.patch b/debian/patches/main-DevelBuild-yes-to-ostree-version-for-devel-builds.patch
new file mode 100644 (file)
index 0000000..035876f
--- /dev/null
@@ -0,0 +1,65 @@
+From: Colin Walters <walters@verbum.org>
+Date: Mon, 19 Jun 2017 11:23:45 -0400
+Subject: main: DevelBuild=yes to `ostree --version` for devel builds
+
+And use it in `test-symbols.sh`, to fix the `distcheck` case;
+the previous change stopped distributing `libostree-devel.sym`
+in release builds.
+
+Closes: #944
+Approved by: jlebon
+
+Origin: upstream, 2017.8, commit:2a082b20b8da2ffecb4f2c0e179a961c0fd26bd0
+---
+ configure.ac          | 5 ++++-
+ src/ostree/ot-main.c  | 3 +++
+ tests/test-symbols.sh | 6 +++++-
+ 3 files changed, 12 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 7946f4f..58795a7 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -460,7 +460,10 @@ AS_IF([test x$enable_experimental_api = xyes],
+ )
+ AM_CONDITIONAL([ENABLE_EXPERIMENTAL_API],[test x$enable_experimental_api = xyes])
+ AM_CONDITIONAL([BUILDOPT_IS_DEVEL_BUILD],[test x$is_release_build != xyes])
+-AM_COND_IF([BUILDOPT_IS_DEVEL_BUILD], release_build_type=devel, release_build_type=release)
++AM_COND_IF([BUILDOPT_IS_DEVEL_BUILD],
++            AC_DEFINE([BUILDOPT_IS_DEVEL_BUILD], [1], [Define if doing a development build])
++            release_build_type=devel,
++            release_build_type=release)
+ AC_CONFIG_FILES([
+ Makefile
+diff --git a/src/ostree/ot-main.c b/src/ostree/ot-main.c
+index 9aca828..40d77f5 100644
+--- a/src/ostree/ot-main.c
++++ b/src/ostree/ot-main.c
+@@ -242,6 +242,9 @@ ostree_option_context_parse (GOptionContext *context,
+       g_print (" Version: %s\n", PACKAGE_VERSION);
+       if (strlen (OSTREE_GITREV) > 0)
+         g_print (" Git: %s\n", OSTREE_GITREV);
++#ifdef BUILDOPT_IS_DEVEL_BUILD
++      g_print (" DevelBuild: yes\n");
++#endif
+       g_print (" Features:\n");
+       for (char **iter = features; iter && *iter; iter++)
+         g_print ("  - %s\n", *iter);
+diff --git a/tests/test-symbols.sh b/tests/test-symbols.sh
+index d22231d..3f62730 100755
+--- a/tests/test-symbols.sh
++++ b/tests/test-symbols.sh
+@@ -22,7 +22,11 @@ set -xeuo pipefail
+ echo '1..3'
+ released_syms=${G_TEST_SRCDIR}/src/libostree/libostree-released.sym
+-devel_syms=${G_TEST_SRCDIR}/src/libostree/libostree-devel.sym
++if echo "$OSTREE_FEATURES" | grep --quiet --no-messages "DevelBuild"; then
++    devel_syms=${G_TEST_SRCDIR}/src/libostree/libostree-devel.sym
++else
++    devel_syms=
++fi
+ if echo "$OSTREE_FEATURES" | grep --quiet --no-messages "experimental"; then
+   experimental_sym="${G_TEST_SRCDIR}/src/libostree/libostree-experimental.sym"
+   experimental_sections="${G_TEST_SRCDIR}/apidoc/ostree-experimental-sections.txt"
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644 (file)
index 0000000..93c089b
--- /dev/null
@@ -0,0 +1,2 @@
+main-DevelBuild-yes-to-ostree-version-for-devel-builds.patch
+build-Add-devel-or-release-to-OSTREE_FEATURES-for-test-sy.patch